package com.xbongbong.pro.rabbitmq.feign;

import com.xbongbong.paas.toolbox.wrap.XbbResponse;
import com.xbongbong.pro.sms.pojo.dto.SmsRabbitMqDTO;
import com.xbongbong.pro.sms.pojo.vo.SmsRabbitMqVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 短信 内部调用接口(消息用)
 * @author youli.chen
 * @date 2019/3/19 15:33
 * @since v1.0
 * @version v1.0
 */
@FeignClient(name = "pro-web-pc",contextId = "smsFeignClient")
public interface SmsFeignClient {

    /**
     * Description: 短信发送(消费)接口
     * @param smsRabbitMqDTO 短信推送  走消息队列，用于传输数据的
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<com.xbongbong.pro.message.pojo.vo.SmsRabbitMqVO>
     * @author youli.chen
     * @date 2019/2/26 16:11
     * @since v1.0
     */
    @RequestMapping(value = "/pro/v1/sms/send", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<SmsRabbitMqVO> smsSend(@RequestBody SmsRabbitMqDTO smsRabbitMqDTO);

    /**
     * Description: 业务列表页发送（消费）短信接口
     * @param smsRabbitMqDTO 业务列表页发送（消费）短信接口  走消息队列，用于传输数据的
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<com.xbongbong.pro.message.pojo.vo.SmsRabbitMqVO>
     * @author youli.chen
     * @date 2019/2/26 16:11
     * @since v1.0
     */
    @RequestMapping(value = "/pro/v1/sms/sendForBusiness", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<SmsRabbitMqVO> smsSendForBusiness(@RequestBody SmsRabbitMqDTO smsRabbitMqDTO);

    /**
     * Description: 重新发送（消费）短信接口
     * @param smsRabbitMqDTO 重新发送（消费）短信接口  走消息队列，用于传输数据的
     * @return com.xbongbong.paas.toolbox.wrap.XbbResponse<com.xbongbong.pro.message.pojo.vo.SmsRabbitMqVO>
     * @author youli.chen
     * @date 2019/2/26 16:11
     * @since v1.0
     */
    @RequestMapping(value = "/pro/v1/sms/reSend", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    XbbResponse<SmsRabbitMqVO> smsReSend(@RequestBody SmsRabbitMqDTO smsRabbitMqDTO);
}
